{%  extends "../public/base.html"  %}

{%  block concent  %}
<div class="tpl-content-wrapper">

    <div class="container-fluid am-cf">
        <div class="row">
            <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
                <div class="page-header-heading">
                    <span class="am-icon-home page-header-heading-icon"></span> 
                    会员修改

                </div>
            </div>
           
        </div>

    </div>

    <div class="row-content am-cf">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <div class="widget-head am-cf">
                <div class="widget-title am-fl">线条表单</div>
                <div class="widget-function am-fr">
                    <a href="javascript:;" class="am-icon-cog"></a>
                </div>
            </div>
            <div class="widget-body am-fr">
                <form class="am-form tpl-form-line-form" action="{% url 'userupdate' %}" method="post" enctype="multipart/form-data">
                    {% csrf_token %}
                    <div>
                        <input type="hidden" name="uid" value="{{ uinfo.id }}">
                    </div>
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">用户名</label>
                        <div class="am-u-sm-9">
                            <input type="text" value="{{ uinfo.name }}" name="username" class="tpl-form-input" placeholder="请输入用户名">
                            
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">密码</label>
                        <div class="am-u-sm-9">
                            <input type="password" name="password" class="tpl-form-input" placeholder="请输入密码">
                            
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">年龄</label>
                        <div class="am-u-sm-9">
                            <input type="text" value="{{ uinfo.age }}" class="tpl-form-input" name="age" placeholder="请输入年龄">
                            
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="user-weibo" class="am-u-sm-3 am-form-label">性别</label>
                        <label class="am-radio-inline">
                            <input type="radio" value="1" {% if uinfo.sex == '1' %} checked {% endif %} name="sex"> 
                            男
                        </label>
                            <label class="am-radio-inline">
                            <input type="radio" value="0" {% if uinfo.sex == '0' %} checked {% endif %} name="sex">
                             女
                        </label>
                    </div>
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">手机号</label>
                        <div class="am-u-sm-9">
                            <input type="text" value="{{ uinfo.phone }}" class="tpl-form-input" name="phone" placeholder="请输入手机号">
                            
                        </div>
                    </div>

                   <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">地址</label>
                        <div class="am-u-sm-9">
                            <input type="text" value="{{ uinfo.address }}" class="tpl-form-input" name="address" placeholder="请输入地址">
                            
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label for="user-phone" class="am-u-sm-3 am-form-label">会员类型</label>
                        <div class="am-u-sm-9">
                            <select name="state" data-am-selected="{searchBox: 1}">
                                <option value="1" {% if uinfo.state == 1 %} selected {% endif %} >会员</option>
                                <option value="2" {% if uinfo.state == 2 %} selected {% endif %} >禁用</option>
                                <option value="0" {% if uinfo.state == 0 %} selected {% endif %} >管理员</option>
                            </select>

                        </div>
                    </div>

                    <div class="am-form-group">
                        <label for="user-weibo" class="am-u-sm-3 am-form-label">头像</label>
                        <div class="am-u-sm-9">
                            <div class="am-form-group am-form-file">
                                <div class="tpl-form-file-img">
                                    <img src="/static/public/img/{{ uinfo.pic }}" width="150">
                                </div>
                                <button class="am-btn am-btn-danger am-btn-sm">
                                    <i class="am-icon-cloud-upload"></i> 添加头像</button>
                                <input id="doc-form-file" type="file"  name="pic" multiple="">
                            </div>

                        </div>
                    </div>

                    

                    <div class="am-form-group">
                        <div class="am-u-sm-9 am-u-sm-push-3">
                            <button class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>        

    </div>
</div>  
{%  endblock  %}